#pragma once
#include <dinput.h>
#include <d3d9.h>
#pragma comment(lib, "dinput8.lib")

class DirectInput
{
public:
	DirectInput();
	DirectInput(DWORD keyboardCoopFlags, DWORD mouseCoopFlags);
	~DirectInput();

	void poll();
	bool keyDown(unsigned char key);
	bool mouseButtonDown(int button);
	float mouseX();
	float mouseY();
	BYTE					mousestate[8];
	IDirectInput8*			din;
	IDirectInputDevice8*	dinkeyboard;
	unsigned char			buffer[256];
	//char buffer[256];
	IDirectInputDevice8*	dinmouse;
	DIMOUSESTATE2			m_mouseState;
	bool					KeyDown[256];

	void initDInput(HINSTANCE hInstance, HWND hWnd);    // sets up and initializes DirectInput
	void detect_input(void);    // gets the current input state
	void cleanDInput(void);
	DirectInput(const DirectInput& rhs);
	DirectInput&	operator=(const DirectInput& rhs);

private:



};


